/**
 * @Author: Boring
 * @Description:
 * @File:  cronjob
 * @Date: 2024-03-02 14:50
 */

package cronjob

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/cronjob"
)

func create(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.POST("/create", cronjob.Create)
}

func update(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.PUT("/update", cronjob.Update)
}

func delete(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.DELETE("/delete", cronjob.Delete)
}

func deleteList(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.POST("/deleteList", cronjob.DeleteList)
}

func get(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.GET("/get", cronjob.Get)
}

func list(cronjobGroup *gin.RouterGroup) {
	cronjobGroup.GET("/list", cronjob.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	cronjobGroup := g.Group("/cronjob")
	create(cronjobGroup)
	update(cronjobGroup)
	delete(cronjobGroup)
	deleteList(cronjobGroup)
	get(cronjobGroup)
	list(cronjobGroup)
}
